home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / AE Stuff / CGenericAE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.5 KB  |  72 lines  |  [TEXT/KAHL]

  1. /*
  2.  * ---------------------------------------------------------------------
  3.  * CGenericAE.h :
  4.  *
  5.  * © Copyright 1992 by F. Menneteau.  All rights reserved.
  6.  * This code can be both distributed and used freely.
  7.  *
  8.  * ---------------------------------------------------------------------
  9.  */
  10.  
  11.  
  12. #pragma once
  13.  
  14.  
  15. #include "AEUtilities.h"
  16.  
  17. #if !defined NO_TCL
  18.  
  19. #include <CObject.h>
  20.  
  21.  
  22. class CGenericAE : indirect CObject {
  23. #else
  24. class CGenericAE : indirect {
  25. #endif
  26. private:
  27.     AEAddressDesc    itsAEAddrDesc    ;
  28.     Boolean            fDescIsValid    ;
  29.  
  30.     DescType        itsEventClass    ;
  31.     DescType        itsEventID        ;
  32.  
  33.     AppleEvent        itsEvent        ;
  34.     AppleEvent        itsReply        ;
  35.  
  36.     Boolean            fEventIsValid    ;
  37.     Boolean            fReplyIsValid    ;
  38.  
  39.     OSErr        privBuidTargetDesc(TargetInfPtr);
  40.  
  41. protected:
  42.     OSErr            itsError        ;
  43.  
  44.     Size        strcspn(const Ptr, const Ptr);
  45.  
  46.     OSErr        protPutParam(AEKeyword, DescType, Ptr, Size);
  47.     OSErr        protFolderPathPutParam(Ptr);
  48.     OSErr        protFilesListPutParam(Ptr, Ptr);
  49.  
  50. public:
  51.     CGenericAE(void) ;
  52.     ~CGenericAE(void) ;
  53.  
  54.     OSErr        BuildTargetWithTargetID(TargetIDPtr);
  55.     OSErr        BuildTargetWithSignOnly(OSType);
  56.     OSErr        BuildTargetWithTypeAndSign(OSType, OSType);
  57.     OSErr        BuildTargetWithPSN(ProcessSerialNumberPtr);
  58.     OSErr        BuildTargetWithSessionID(PPCSessRefNumPtr);
  59.     OSErr        BuildTargetWithRemoteName(Ptr);
  60.     OSErr        AskAndBuildTarget(SelectorType);    // calls PPCBrowser()
  61.  
  62.     OSErr        CreateAE(DescType, DescType);
  63.     OSErr        SendAE(AESendMode);
  64.     OSErr        SendAEWithoutReply(void);
  65.     OSErr        SendAEWithReply(void);
  66.  
  67.     Boolean        GetEvent(AppleEventPtr);
  68.     Boolean        GetReply(AppleEventPtr);
  69. } ;
  70.  
  71.  
  72.